package CodeThree;

import java.util.Comparator;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;

/** @author ASUS */
public class Reordering {
  public static void main(String[] args) {
    // 定义Treemap 使其按照主键升序排列
    TreeMap<Integer, Integer> results = new TreeMap<>(Comparator.comparingInt(integer -> integer));
    Scanner inputScan = new Scanner(System.in);
    int count = inputScan.nextInt();
    for (int i = 0; i < count; i++) {
      int tmp = inputScan.nextInt();
      if (!results.containsKey(tmp)) {
        results.put(tmp, 0);
      }
    }
    for (Map.Entry<Integer, Integer> entry : results.entrySet()) {
      System.out.printf("%d ", entry.getKey());
    }
  }
}
